"""
获取发票信息接口
"""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()


def create_app(config):        
    app = Flask(__name__)
    app.config.from_object(config)
    if app.testing or app.debug:
        app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///app.db'
    db.init_app(app)

    from app.inv import bp as main_bp
    app.register_blueprint(main_bp, url_prefix='/')
    
    return app


from app import models, utils
